package com.lsj.firsterp.mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

import com.lsj.firsterp.model.User;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author Lsj
 * @version 1.0
 * @date 2021/7/1 17:59
 */

@Mapper
public interface UserMapper {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(User record);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    User selectByPrimaryKey(Integer id);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(User record);

    /**
     * 查询全部
     * @param user 用户
     * @return 用户类型为list
     */
    List<User> selectByAll(User user);

    /**
     * 登录
     * @param user 用户
     * @return 成功或者失败
     */
    User login(User user);

}